<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="gen_validatorv4.js" type="text/javascript"></script>
<title>Create Member</title>
</head>
<body>
<div><b> Create Member </b></div><br>

<form id="form1" method="post" action="CreateMember">
	<div class="form-row"><span class="label">Email: </span><input type="text" name="email"/></div>
	<div class="form-row"><span class="label">Password: </span><input type="password" name="password"/></div>
	<div class="form-row"><span class="label">First Name: </span><input type="text" name="first"/></div>
	<div class="form-row"><span class="label">Last Name: </span><input type="text" name="last"/></div>
	<div class="form-row"><span class="label">Address: </span><input type="text" name="address"/></div>
	<div class="form-row"><span class="label">City: </span><input type="text" name="city"/></div>
	<div class="form-row"><span class="label">State: </span><input type="text" name="state"/></div>
	<div class="form-row"><span class="label">Zip Code: </span><input type="text" name="zip"/></div>
	<div class="form-row"><span class="label">Membership Type: </span><select name="type">
																		<option value="simple" selected="selected">Simple</option>
																		<option value="premium">Premium</option>
																		</select></div>
															
	<div class="form-row"><input class ="submit" type="submit" value="Submit"/></div>
</form>

<script  type="text/javascript">
	 var frmvalidator = new Validator("form1");

	 frmvalidator.addValidation("email","req", "Please enter in your email.");
	 frmvalidator.addValidation("email","email", "Please enter in a valid email.");
	 frmvalidator.addValidation("password","req", "Please enter in your password.");
	 frmvalidator.addValidation("password","minlength=6", "Password must contain at least 6 characters");
	 frmvalidator.addValidation("first","req", "Please enter in your first name.");
	 frmvalidator.addValidation("last","req", "Please enter in your last name.");
	 frmvalidator.addValidation("address","req", "Please enter in your street address.");
	 frmvalidator.addValidation("address","maxlen=256", "Address must be no greater than 256 characters.");
	 frmvalidator.addValidation("city","req", "Please enter in your city.");
	 frmvalidator.addValidation("city","maxlen=32", "City must be no greater than 32 characters.");
	 frmvalidator.addValidation("state","req", "Please enter in your state.");
	 frmvalidator.addValidation("state","maxlen=32", "State must be no greater than 32 characters.");
	 frmvalidator.addValidation("zip","req", "Please enter in your zip code.");
	 frmvalidator.addValidation("zip","maxlen=5", "Zip code must be 5 digits.");
	 frmvalidator.addValidation("zip","minlen=5", "Zip code must be 5 digits.");
	 frmvalidator.addValidation("zip","numeric", "Zip code must numeric."); 


</script>

</body>
</html>